home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 121
/
FreelogMagazineJuilletAout2014-No121.iso
/
Outils
/
Adobe-Air
/
adobe-air_13.exe
/
[0]
/
setup.swf
/
scripts
/
skins
/
SimpleScrollThumbSkin.as
< prev
next >
Wrap
Text File
|
2014-03-27
|
2KB
|
62 lines
package skins
{
import flash.display.DisplayObject;
import mx.core.UIComponent;
public class SimpleScrollThumbSkin extends UIComponent
{
private var thumbIcon:DisplayObject;
public function SimpleScrollThumbSkin()
{
super();
}
override public function get measuredWidth() : Number
{
return 16;
}
override protected function updateDisplayList(param1:Number, param2:Number) : void
{
super.updateDisplayList(param1,param2);
var _loc3_:uint = getStyle("thumbBorderColor");
var _loc4_:uint = getStyle("thumbFillColor");
var _loc5_:uint = getStyle("thumbOverFillColor");
graphics.clear();
switch(name)
{
case "thumbUpSkin":
default:
drawRoundRect(1,1,param1 - 1,param2 - 1,0,_loc3_,1);
drawRoundRect(2,2,param1 - 3,param2 - 3,0,_loc4_,1);
break;
case "thumbOverSkin":
case "thumbDownSkin":
drawRoundRect(1,1,param1 - 1,param2 - 1,0,_loc3_,1);
drawRoundRect(2,2,param1 - 3,param2 - 3,0,_loc5_,1);
}
this.thumbIcon.x = (param1 - this.thumbIcon.width) / 2;
this.thumbIcon.y = (param2 - this.thumbIcon.height) / 2;
}
override protected function createChildren() : void
{
var _loc1_:Class = null;
if(!this.thumbIcon)
{
_loc1_ = getStyle("scrollThumbIcon");
this.thumbIcon = new _loc1_();
addChild(this.thumbIcon);
}
}
override public function get measuredHeight() : Number
{
return 10;
}
}
}